package com.example.novelweb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.novelweb.common.BaseResponse;
import com.example.novelweb.common.ResultUtils;
import com.example.novelweb.model.entity.Tag;
import com.example.novelweb.model.vo.TagVO;
import com.example.novelweb.service.TagService;
import com.example.novelweb.mapper.TagMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author PERSON
* @description 针对表【tag(标签)】的数据库操作Service实现
* @createDate 2025-01-06 20:01:03
*/
@Service
public class TagServiceImpl extends ServiceImpl<TagMapper, Tag>
    implements TagService{

  @Override
  public List<TagVO> getTagsByNovelId(Long novelId) {
    return getBaseMapper().getTagsByNovelId(novelId);
  }

  @Override
  public BaseResponse<List<TagVO>> listAll() {
    List<TagVO> list = getBaseMapper().listAllTags();
    return ResultUtils.success(list);
  }
}




